package mule.view;

//<editor-fold defaultstate="collapsed" desc="Imports">
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.SceneBuilder;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBuilder;
import javafx.scene.layout.StackPaneBuilder;
//</editor-fold>

/**
 *
 * @author stephen
 */
public class LoadGameView extends View
{
    Button backButton;

    public Scene getScreen() 
    {
        return createLoadGameScreen();
    }

    private Scene createLoadGameScreen()
    {
        Scene loadGameScreen = SceneBuilder.create()
            .width( SCREEN_WIDTH )
            .height( SCREEN_HEIGHT )
            .root(
                StackPaneBuilder.create()
                .children(
                    backButton() 
                )
                .build()
            )
        .build();

        return loadGameScreen;
    }

    private Button backButton()
    {
        return ButtonBuilder.create()
            .text("Go Back")
        .build();
    }
    
    public void addBackListener( EventHandler event ) {
        backButton.onActionProperty().set( event );
    }
}